package com.fy.fyai.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * RAG配置实体类
 * @author fwq
 * @date 2025-01-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("rag_config")
public class RagConfig {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * RAG标签
     */
    @TableField("rag_tag")
    private String ragTag;

    /**
     * 知识库名称
     */
    @TableField("knowledge_name")
    private String knowledgeName;

    /**
     * 创建人
     */
    @TableField("creator")
    private String creator;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 启用状态 (1:启用, 0:禁用)
     */
    @TableField("enabled")
    private Integer enabled;

    /**
     * 删除状态 (1:已删除, 0:未删除)
     */
    @TableField("deleted")
    @TableLogic(value = "0", delval = "1")
    private Integer deleted;

    /**
     * 描述信息
     */
    @TableField("description")
    private String description;

    /**
     * 文件路径
     */
    @TableField("file_path")
    private String filePath;
}
